package org.robot.scm.platform.server.handler;

import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import java.io.IOException;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.robot.scm.pojos.config.BaseConfig;

/**
 * ping
 */
@Slf4j
@NoArgsConstructor
public class PingPongHandler extends BaseHandler implements HttpHandler {

    @Override
    public String getUri() {
        return "/ping";
    }

    @Override
    public boolean needAuth() {
        return Boolean.FALSE;
    }

    @Override
    public void handle(HttpExchange exchange) throws IOException {
        sendSuccessResponse(exchange, "pong");
    }
}
